package cn.exrick.xboot.modules.your.graphics;

import cn.exrick.xboot.XbootApplication;
import cn.exrick.xboot.modules.graphics.entity.GraphicsContainer;
import cn.exrick.xboot.modules.graphics.service.IGraphicsContainerService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import static org.junit.Assert.*;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: njp
 * @Date: 2020/09/08/17:03
 * @Description:
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = XbootApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class IGraphicsContainerServiceImplTest {
    @Autowired
    private IGraphicsContainerService iGraphicsContainerService;
    @Test
    public void deleteByGraphicsId() {
        boolean b = iGraphicsContainerService.deleteByGraphicsId("11");
        System.out.println("20200908测试："+b);
    }

    @Test
    public void add() {
        GraphicsContainer graphicsContainer=new GraphicsContainer();
        graphicsContainer.setCTitle("test");
        graphicsContainer.setContent("test");
        graphicsContainer.setHeight("test");
        graphicsContainer.setRowSpan("test");
        graphicsContainer.setWidth("test");
        graphicsContainer.setGraphicsId("11");
        graphicsContainer.setContainerId("12");
        boolean add = iGraphicsContainerService.add(graphicsContainer,"123");
        System.out.println("20200909测试："+add);
    }
}